package com.realestate.services;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.realestate.constants.ComTxManagerName;
import com.realestate.dao.CommonAttributeDao;
import com.realestate.model.BrtbCommonAttribute;

@Service
public class CommonAttributeServiceImpl implements CommonAttributeService{
	
	@SuppressWarnings("unused")
	private static final Logger LOGGER = Logger.getLogger(CommonAttributeServiceImpl.class);
	
	@Autowired
    private CommonAttributeDao commonAttributeDao;
 
    @Transactional(value = ComTxManagerName.COM_TRANSACTION_MANAGER)
    public List<BrtbCommonAttribute> getAllCommonAttributes() {
        return commonAttributeDao.getAllCommonAttributes();
    }

	@Override
	public BrtbCommonAttribute getCommonAttributesByCode(String code) {
		return commonAttributeDao.getCommonAttributeByCode(code);
	}
}
